<?php
/**
 * Necro View for Congregation Component
 * 
 * @package    Congregation
 * @subpackage Components
 * @link http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_4
 * @license		GNU/GPL
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view' );

/**
 * Necro View
 *
 * @package    Congregation
 * @subpackage Components
 */
class CongregationViewNecro extends CongregationView
{
	
	
	function display($tpl = null)
	{
		// Get data from the model
		$necro =& $this->get('Data');
		
		$isNew		= ($necro->id < 1);
		$this->assignRef('necro', $necro);

		
		if($isNew)
		{
			$passedusers =& $this->get('PassedUsers');
			$this->assignRef('passedusers', $passedusers);
			JToolBarHelper::title(   JText::_( 'New Necrology' ), 'generic.png' );
		}
		else
		{
			JToolBarHelper::title(   JText::_( 'Edit Necrology' ), 'generic.png' );
		}
		
		JToolBarHelper::save();

		JToolBarHelper::back(JText::_('Back'), JRoute::_( 'index.php?option=com_congregation&controller=necro' ));
	    $editor = & JFactory::getEditor();
		$this->assignRef('editor',    $editor);

		
		

		parent::display($tpl);
	}
	
}
